<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
<meta name="renderer" content="webkit"/> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<script type="text/javascript" src="/kitkat/resources/js/jquery.js"></script>
<script type="text/javascript">
function login(){
	var email = $("#email").val();
	var password = $("#password").val();
	
	$.post("/kitkat/user/login",{
		"email" : email,
		"password" : password
	},function(data,status){
		if(data.result=='success'){
			window.location = "/kitkat/user/projects";
		}
		else{
			alert(data.result);
			return ;
		}
	},"json");
}
</script>
<title>注册</title>
</head>
<body>
	<div>
		<form>
			<table>
				<tbody>
					<tr>${result }</tr>
					<tr><td>邮箱:<input type="text" id="email"/></td></tr>
					<tr><td>密码:<input type="text" id="password"/></td></tr>
					<tr><td><input type="button" value="登录" onclick="login();"/></td></tr>
				</tbody>
			</table>
		</form>
	</div>
</body>
</html>